import axios from "axios";

export async function customGet(url,params,headers){
    try {
        let response =  await axios.get(url,{params,headers});
        console.log(response);
        return response.data;
    }catch (e) {
        console.log("请求失败:",e);
        throw e;
    }
}

export async function customPost(url,data,headers){
    try {
        let response = await axios.post(url,data,{headers})
        console.log(response);
        return response.data;
    }catch (e){
        console.log("请求失败:",e);
        throw e;
    }
}